#ifndef TYPES_H
#define TYPES_H

#include <vector>
#include <string>

using namespace std;

namespace fc
{

struct Example
{
    vector<double> antacedent;
    int consequent;
};

struct FuzzySet
{
    double begin;
    double end;
    inline double membership(double value) const
    {
        return value < begin || value > end ? 0 :
               value < (end + begin) / 2 ?
               (value - begin) / ((end + begin) / 2 - begin) :
               (end - value) / ((end + begin) / 2 - begin);
    }
};

struct RuleInfo
{
    string antacedent;
    int consequent;
    double weight;

    RuleInfo(string ant, int cons, double memb) :
            antacedent(ant),
            consequent(cons),
            weight(memb) {}
};

struct Result
{
    int resultClass;
    double weight;

    Result(int cl, double w) :
            resultClass(cl),
            weight(w) {}
};

struct AttributeWeight
{
	int attributeNr;
	double weight;

	AttributeWeight() {}
	AttributeWeight(int nr, double w) :
            attributeNr(nr),
            weight(w) {}
};

}

#endif
